package com.adou.d10;

/**
 * 定一个线程接口
 */
public class RunnableTest {
    public static void startThread(Runnable runnable) {
        new Thread(runnable).start();
    }

    public static void main(String[] args) {
//        startThread(new Runnable() {
//            @Override
//            public void run() {
//                System.out.println(Thread.currentThread().getName() + "线程启动了");
//            }
//        });

        startThread(() -> System.out.println(Thread.currentThread().getName() + "线程启动了"));
    }
}
